The CrossTabObject

A CrossTabObject object in the Report Designer represents a single cross-tab in your report. Cross-tabs are specialized subreports. Even if you design your primary report as a cross-tab, it is added to the report page as a separate object inside the report.

You can obtain CrossTabObject objects from a report much like you obtain subreports. Since a CrossTabObject is a report object like a field or a subreport, you can access it through the ReportObjects collection.

CrossTabObjects can be manipulated in the same way as other report objects. However, due to the complexity of this object, few properties and methods are exposed.

The following code searches for cross-tabs in a report and applies formatting features to make them stand out from the rest of the report.

Dim Report As New CrystalReport1
Dim xtObject As CrossTabObject
Dim sect As Section
Dim rptObject As Object For Each sect In Report.Sections             For Each rptObject In sect.ReportObjects                 If rptObject.Kind = crCrossTabObject Then                     Set xtObject = rptObject
                xtObject.BorderColor = RGB(255, 0, 0)
                    xtObject.HasDropShadow = True
                    Set xtObject = Nothing                 End If             Next Next


Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com